library(raster)
source('https://raw.githubusercontent.com/oharac/src/master/R/common.R')
source(here('common_fxns.R'))
library(animation)
reload <- FALSECreate a species richness map for only the species included in this assessment.
Combine taxa-level impact and refugia maps to create maps of number of species impacted per cell, per year, and species in refugia (i.e., zero impact) per cell, per year.
Plot maps as animated rasters, both by absolute numbers of species impacted in a location and by proportion of species.
Set up the dataframe of species to include. By taxon, load all species range maps, smash down to taxon-level species richness; then combine these for a total species richness.
For each combination of climate/no climate and impacts/refugia:
calc(fun = sum, na.rm = TRUE)